/**
 * Copyright (c) 2018 湖南牛数 All rights reserved.
 *
 * https://www.dshubs.io
 *
 * 版权所有，侵权必究！
 */

package io.dshubs.archives.feign;


import io.dshubs.archives.dto.ArchiveBaseCategoryDto;
import io.dshubs.archives.feign.fallback.ArchivesFeignClientFallbackFactory;
import io.dshubs.commons.tools.constant.ServiceConstant;
import io.dshubs.commons.tools.utils.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 用户接口
 *
 * @author Mark sunlightcs@gmail.com
 */

@FeignClient(name = "dshubs-archives-server", contextId = "ArchivesFeignClient", fallbackFactory = ArchivesFeignClientFallbackFactory.class)
public interface ArchivesFeignClient {

    @DeleteMapping("/archive/info/code")
    Result deleteByCode(@RequestBody @NotNull(message = "批量删除id不能为空") List<Long> ids);

    @GetMapping("/archive/class/client")
     Result<ArchiveBaseCategoryDto> getById(@RequestBody Long id);
}